package IO;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;

public class ReadStringDemo {
    public static void main(String[] args) throws IOException {
        File file = new File("./test.dat");
        long size= file.length();
        byte[] bytes=new byte[(int)size];
        FileInputStream fis=new FileInputStream(file);
        fis.read(bytes);
        String s = bytes.toString();
        System.out.println(s);
    }
}
